﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Drawing.Design;
//using System.Linq;
using System.Reflection;
using System.Text;
//using System.Threading.Tasks;
using TRicheControl.Editor.Forms;
using TRicheControl.WinformControl;

namespace TRicheControl.Editor
{
    public class RicheMenuBarItemEditor : CollectionEditor
    {


        protected override object CreateInstance(Type itemType)
        {
            return base.CreateInstance(itemType);
        }
        public RicheMenuBarItemEditor() : base(typeof(RicheMenuBarItemCollection))
        {
        }

        //private frmRicheMenuBarItemEditor frm;

        protected override object SetItems(object editValue, object[] value)
        {
            return base.SetItems(editValue, value);
        }

        protected override object[] GetItems(object editValue)
        {
            return base.GetItems(editValue);
        }

        protected override CollectionForm CreateCollectionForm()
        {
            
            return base.CreateCollectionForm();
        }

        //public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        //{
        //    frm = new frmRicheMenuBarItemEditor(value);
        //    if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        //    {
        //        return frm.RicheMenuBarItems;
        //    }
        //    else
        //    {
        //        return value;
        //    }
        //}

        //public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
        //{
        //    return UITypeEditorEditStyle.Modal;
        //}
    }
}
